import Vue from 'vue'
import App from './App'
import router from './router'
import "babel-polyfill"
import api from './http'
import axios from 'axios'
import i18n from './i18n'
import qs from 'qs'
import store from './store'
import config from "./assets/js/common"
import global from '@/utils/global'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'font-awesome/css/font-awesome.min.css'
import './utils/dialog'

Vue.use(ElementUI) // 注册使用Element
Vue.use(api) // 注册使用API模块

Vue.prototype.global = global // 挂载全局配置模块
Vue.prototype.$axios = axios;
Vue.prototype.$Config = config;
Vue.prototype.$qs = qs;

Vue.config.errorHandler = (err, vm, info) => {
  console.error('捕获异常：', err, vm, info);
}

new Vue({
    el: '#app',
    i18n,
    router,
    store,
    render: h => h(App)
})
